package com.yenlien.traceyun.usercenter.dao;

import com.yenlien.traceyun.usercenter.entity.App;
import com.yenlien.traceyun.webase.dao.BaseJpaDao;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author: bigwangy@sina.com
 * @create: 2020-03-10
 * @description:
 **/
public interface AppDao extends BaseJpaDao<App> {

    @Modifying
    @Transactional
    @Query("update App a set a.used=?2 where id=?1")
    public void used(String id, boolean used);


    App findByName(String name);
}
